package com.order.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.order.common.R;
import com.order.po.orderlist;
import com.order.po.return_orderlist;
import com.order.service.return_orderlistService;

@Controller
public class return_orderlistController {
	 @Autowired
	   private return_orderlistService return_orderlistService;
	 
	 @RequestMapping({"/getAllreturnorder"})
	   @ResponseBody
	   public R getAllreturnorder()
	   {
		 R r = R.ok().put("data", this.return_orderlistService.getAllreturnorder());
	     return r;
	   }
	 
	 @RequestMapping({ "/insert_returnorder" })
		@ResponseBody
		public void insert_returnorder(return_orderlist g) {
			this.return_orderlistService.insert_returnorder(g);
		 }
	 
	 @RequestMapping({ "/delete_returnorder" })
		@ResponseBody
		public void delete_returnorder(String r_orderid) {
			this.return_orderlistService.delete_returnorder(r_orderid);
		 }
	 
	  @RequestMapping({"/get_returnorderbypar"})
	   @ResponseBody
	   public R get_returnorderbypar(String parameter,String parameter1,String parameter2)
	   {
		  R r = R.ok().put("data",this.return_orderlistService.get_returnorderbypar(parameter,parameter1,parameter2));
	     return r;
	   }
	  
	  @RequestMapping({"/get_returnorderbyuser"})
	   @ResponseBody
	   public R get_returnorderbyuser(String parameter,String parameter1,String parameter2)
	   {
		  R r = R.ok().put("data",this.return_orderlistService.get_returnorderbyuser(parameter,parameter1,parameter2));
	     return r;
	   }
	  
	  @RequestMapping({"/update_rtype"})
	   	@ResponseBody
	   public void update_rtype(String parameter)
	   {
	     this.return_orderlistService.update_rtype(parameter);
	   }
}
